#!/usr/bin/env bash
rm -rf platforms/android/build/outputs/apk/
echo 删除多余apk
. scripts/update_ver.sh

gulp testApp
echo 执行ios prepare
cordova prepare ios
#ionic state reset
echo 恢复插件成功

echo 开始压缩文件,上传至oss
#./scripts/upload.py oss-cn-hangzhou.aliyuncs.com 02yUhyzfxsxzLCKA 6Cw3uKQKKRedocMtfZVfCxHoeZh2h6 yueguanjia-bucket www www_test.zip app/customer/test/www.zip
echo 上传结束

ionic build android --release
cp platforms/android/build/outputs/apk/release/android-release-unsigned.apk ygj-customer-test-$VERSION.apk
echo 移动目标文件完成
echo jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore sign.keystore ygj-customer-test-$VERSION.apk yueguanjia
jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore sign.keystore ygj-customer-test-$VERSION.apk yueguanjia
